﻿using Microsoft.Xna.Framework;

namespace Ah.Testudin.Engine.Graphics.Scenes.SceneNodes
{
    public class SpriteRootSceneNode : SceneNodeBase
    {
        #region Constructors

        public SpriteRootSceneNode()
            : base("Sprite Root Node", null, RenderPass.StaticActor, Matrix.Identity)
        {
        }

        #endregion

        #region SceneNodeBase

        public override void PreRender(Scene scene)
        {
            scene.Renderer.BeginSpriteBatch();

            base.PreRender(scene);
        }

        public override void Render(Scene scene)
        {
            // I don't draw anything
        }

        public override void PostRender(Scene scene)
        {
            scene.Renderer.EndSpriteBatch();

            base.PreRender(scene);
        }

        #endregion
    }
}
